package com.ysd.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author dapeng
 * @since 2021-07-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Chapter对象", description="")
public class Chapter extends Model<Chapter> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "章节名称")
    private String name;

    @ApiModelProperty(value = "所属课程")
    private Integer courseId;

    @ApiModelProperty(value = "所属课程名称")
    private String courseName;

    @ApiModelProperty(value = "简称")
    private String nickName;

    @ApiModelProperty(value = "类型  正课 ")
    private String type;

    @ApiModelProperty(value = "状态 0开发中 1正常 2停用")
    private Integer status;

    @ApiModelProperty(value = "章节序号")
    private Integer orderNum;

    @ApiModelProperty(value = "章节下视频")
    @TableField(exist = false)
    private List<SysChapterVideo> sysChapterVideoList;

    @ApiModelProperty(value = "章节下题目总数")
    @TableField(exist = false)
    private Integer tnum;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
